import React, { useEffect } from 'react';
import { Link } from 'react-router-dom';
import { useQuery } from '@common/hooks';
import { getAPI } from '@utils';

export default function Workflows() {
  const [query] = useQuery();

  const getPreData = () => {
    query.get(getAPI('GET_APPONE_PRE_DATA', 'mock'), {}, {
      callback: ({ data = [] }) => {
        console.log(data);
      }
    });
  }

  useEffect(() => {
    getPreData();
  }, []);

  return <Link to={`/${process.env.APP_NAME}/workflows/details`}>Click To Details</Link>
}